<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="shortcut icon" href="../../../docs/src/assets/image2D.png">
    <script src="../../../build/image2D.js"></script>
    <title>image2D - 用例测试 - 错误提示是否有用</title>
</head>

<body>
    <script>

        // 准备画布
        var svg = $$('<svg></svg>').attr({
            "width": 400,
            "height": 200
        }).appendTo('body');

        // 获取并配置画笔
        var painter = svg.painter();

        /**
         * 测试开始
         * ----------------------------
         */

        try { painter.strokeCircle(100, 100, 90); } catch (e) { console.error(e); }
        try { painter.fillCircle(300, 100, 70); } catch (e) { console.error(e); }

        try { painter.strokeArc(200, 200, 140, 160, Math.PI * 7 / 4, -Math.PI / 4); } catch (e) { console.error(e); }
        try { painter.fillArc(200, 200, 140, 160, Math.PI * 7 / 4, -Math.PI / 4); } catch (e) { console.error(e); }

        try { painter.quadraticCurveTo(20, 100, 200, 20); } catch (e) { console.error(e); }

        try { painter.strokeRect(20, 20, 60, 160); } catch (e) { console.error(e); }

        try { painter.fillText('1', 0, 200); } catch (e) { console.error(e); }
        try { painter.strokeText('2', 0, 200); } catch (e) { console.error(e); }

    </script>
</body>

</html>